<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use App\Api\Controllers\Commons\UserApi;
use App\Http\Controllers\TestController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\VisitorsController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    if (request()->getHost() == 'www.huoping.top') {
        return redirect(url('/h5'));
    }
    return redirect(admin_url('/'));
});
Route::any('/device/identify', [TestController::class, 'identify']);
Route::any('/device/identify2', [TestController::class, 'identify2']);
Route::get('/getUserData/{user_id}', [UserController::class, 'getUserData']);

Route::get('/visitors', [VisitorsController::class, 'index'])->name('visitors');
Route::post('/api/visitors/addVisitors', [VisitorsController::class, 'addVisitors']);

Route::get('/getUserInfo', [UserController::class, 'getUserInfo']);
Route::get('/queryData/{phone}', [UserApi::class, 'queryData']);
Route::get('/beanInfo', [UserApi::class, 'beanInfo']);


